package com.tp03g03;

import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.TabHost;

public class MainActivity extends TabActivity {
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);

		Resources res = getResources();
		TabHost tabHost = getTabHost();
		TabHost.TabSpec spec;
		Intent intent;

		// Tab de comida
		intent = new Intent().setClass(this, TabVistaComidaActivity.class);
		spec = tabHost
				.newTabSpec("comida")
				.setIndicator("Comida",
						res.getDrawable(android.R.drawable.ic_menu_manage))
				.setContent(intent);
		tabHost.addTab(spec);

		// Tab de invitados
		intent = new Intent().setClass(this, TabVistaInvitadosActivity.class);
		spec = tabHost
				.newTabSpec("invitados")
				.setIndicator("Invitados",
						res.getDrawable(android.R.drawable.ic_menu_agenda))
				.setContent(intent);
		tabHost.addTab(spec);

		// Tab de alarmas
		intent = new Intent().setClass(this, TabVistaAlarmasActivity.class);
		spec = tabHost
				.newTabSpec("alarmas")
				.setIndicator("Alarmas",
						res.getDrawable(android.R.drawable.ic_menu_my_calendar))
				.setContent(intent);
		tabHost.addTab(spec);

		tabHost.setCurrentTab(0);

	}
}
